<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 家族树</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f8f8;
            color: #333;
            margin: 0;
            padding: 0;
            padding-bottom: 83px; /* 为底部导航栏留出空间 */
        }
        
        /* 移动设备滚动条样式 */
        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }
        
        ::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }
        
        /* 使滚动更流畅 */
        * {
            -webkit-overflow-scrolling: touch;
        }
        
        /* 横向滚动容器 */
        .scroll-container-x {
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            scrollbar-width: thin; /* Firefox */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
            padding-bottom: 8px; /* 为滚动条预留空间 */
        }
        
        /* 隐藏滚动条但保留功能 */
        .scroll-hidden::-webkit-scrollbar {
            display: none;
        }
        
        .scroll-hidden {
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }
        
        /* 状态栏样式 */
        .status-bar {
            height: 44px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 顶部导航栏 */
        .top-nav {
            background-color: #ffffff;
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 底部导航栏样式 */
        .tab-bar {
            height: 83px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-around;
            align-items: center;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            border-top: 1px solid #f0f0f0;
            padding-bottom: 20px; /* 适配iPhone底部安全区域 */
        }
        
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #999;
            font-size: 10px;
            padding: 8px 0;
        }
        
        .tab-item.active {
            color: #e86c60; /* 主题色 */
        }
        
        .tab-icon {
            font-size: 22px;
            margin-bottom: 4px;
        }
        
        /* 动态卡片样式 */
        .post-card {
            background-color: #ffffff;
            border-radius: 12px;
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }
        
        .post-header {
            display: flex;
            align-items: center;
            padding: 12px 16px;
        }
        
        .post-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 12px;
        }
        
        .post-user-info {
            flex: 1;
        }
        
        .post-username {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 2px;
        }
        
        .post-time {
            font-size: 12px;
            color: #999;
        }
        
        .post-content {
            padding: 0 16px 16px;
        }
        
        .post-text {
            margin-bottom: 12px;
            line-height: 1.5;
        }
        
        .post-images {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
            margin-bottom: 12px;
        }
        
        .post-image {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
            border-radius: 4px;
        }
        
        .post-actions {
            display: flex;
            justify-content: space-around;
            padding: 12px 0;
            border-top: 1px solid #f0f0f0;
        }
        
        .post-action {
            display: flex;
            align-items: center;
            color: #666;
            font-size: 14px;
        }
        
        .post-action i {
            margin-right: 6px;
        }
        
        /* 故事条样式 */
        .stories-container {
            padding: 16px;
            white-space: nowrap;
            margin-bottom: 16px;
        }
        
        .story-item {
            display: inline-block;
            margin-right: 12px;
            text-align: center;
        }
        
        .story-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #e86c60;
            padding: 2px;
            margin-bottom: 4px;
        }
        
        .story-username {
            font-size: 12px;
            color: #666;
            max-width: 60px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* 搜索框样式 */
        .search-bar {
            background-color: #f0f0f0;
            border-radius: 20px;
            padding: 8px 16px;
            display: flex;
            align-items: center;
            margin-right: 12px;
            flex: 1;
        }
        
        .search-icon {
            color: #999;
            margin-right: 8px;
        }
        
        .search-input {
            background: transparent;
            border: none;
            outline: none;
            font-size: 14px;
            flex: 1;
        }
    </style>
</head>
<body>
    <!-- iOS状态栏 -->
    <div class="status-bar">
        <div class="time font-medium">9:41</div>
        <div class="icons flex">
            <i class="fas fa-signal mr-1"></i>
            <i class="fas fa-wifi mr-1"></i>
            <i class="fas fa-battery-full"></i>
        </div>
    </div>
    
    <!-- 顶部导航栏 -->
    <div class="top-nav">
        <div class="search-bar">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索家族成员、动态、活动...">
        </div>
        <a href="#" class="text-gray-800">
            <i class="fas fa-bell text-xl"></i>
        </a>
    </div>
    
    <!-- 故事条 -->
    <div class="stories-container scroll-container-x scroll-hidden">
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">张伯父</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">李奶奶</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">王叔叔</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">赵姨妈</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">刘大哥</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">陈妹妹</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1552058544-f2b08422138a?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">周爷爷</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1491349174775-aaafddd81942?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">吴婶婶</div>
        </div>
        <div class="story-item">
            <img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="story-avatar">
            <div class="story-username">郑舅舅</div>
        </div>
    </div>
    
    <!-- 动态列表 -->
    <div class="px-4">
        <!-- 动态1 -->
        <div class="post-card">
            <div class="post-header">
                <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="post-avatar">
                <div class="post-user-info">
                    <div class="post-username">张伯父</div>
                    <div class="post-time">今天 10:30 · 家族活动</div>
                </div>
                <i class="fas fa-ellipsis-h text-gray-400"></i>
            </div>
            <div class="post-content">
                <div class="post-text">
                    今天是我们张家第三代长孙的百日宴，全家人都来庆祝了！这个小家伙真是太可爱了，希望他健康快乐地成长。#家族新成员 #百日宴
                </div>
                <div class="post-images">
                    <img src="https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="动态图片" class="post-image">
                    <img src="https://images.unsplash.com/photo-1566004100631-35d015d6a491?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="动态图片" class="post-image">
                    <img src="https://images.unsplash.com/photo-1492562080023-ab3db95bfbce?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="动态图片" class="post-image">
                </div>
            </div>
            <div class="post-actions">
                <div class="post-action">
                    <i class="far fa-heart"></i>
                    <span>32</span>
                </div>
                <div class="post-action">
                    <i class="far fa-comment"></i>
                    <span>8</span>
                </div>
                <div class="post-action">
                    <i class="far fa-share-square"></i>
                    <span>分享</span>
                </div>
            </div>
        </div>
        
        <!-- 动态2 -->
        <div class="post-card">
            <div class="post-header">
                <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="post-avatar">
                <div class="post-user-info">
                    <div class="post-username">李奶奶</div>
                    <div class="post-time">昨天 16:45 · 家族故事</div>
                </div>
                <i class="fas fa-ellipsis-h text-gray-400"></i>
            </div>
            <div class="post-content">
                <div class="post-text">
                    翻出了一张老照片，这是1965年我和你爷爷结婚时的合影。那时候条件艰苦，但是日子过得很甜蜜。现在家族兴旺，子孙满堂，真是幸福！#家族回忆 #老照片
                </div>
                <div class="post-images" style="grid-template-columns: 1fr;">
                    <img src="https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="动态图片" class="post-image" style="aspect-ratio: 4/3;">
                </div>
            </div>
            <div class="post-actions">
                <div class="post-action">
                    <i class="far fa-heart"></i>
                    <span>56</span>
                </div>
                <div class="post-action">
                    <i class="far fa-comment"></i>
                    <span>23</span>
                </div>
                <div class="post-action">
                    <i class="far fa-share-square"></i>
                    <span>分享</span>
                </div>
            </div>
        </div>
        
        <!-- 动态3 -->
        <div class="post-card">
            <div class="post-header">
                <img src="https://images.unsplash.com/photo-1599566150163-29194dcaad36?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="用户头像" class="post-avatar">
                <div class="post-user-info">
                    <div class="post-username">王叔叔</div>
                    <div class="post-time">3天前 · 家族通知</div>
                </div>
                <i class="fas fa-ellipsis-h text-gray-400"></i>
            </div>
            <div class="post-content">
                <div class="post-text">
                    各位家人注意，下个月15日是我们家族的年度聚会，地点定在老家的祖屋。请大家安排好时间，准时参加。有什么问题可以在评论区留言，或者私信我。#家族聚会 #重要通知
                </div>
            </div>
            <div class="post-actions">
                <div class="post-action">
                    <i class="far fa-heart"></i>
                    <span>45</span>
                </div>
                <div class="post-action">
                    <i class="far fa-comment"></i>
                    <span>17</span>
                </div>
                <div class="post-action">
                    <i class="far fa-share-square"></i>
                    <span>分享</span>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 底部导航栏 -->
    <div class="tab-bar">
        <a href="home.html" class="tab-item active">
            <i class="tab-icon fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="family_tree.html" class="tab-item">
            <i class="tab-icon fas fa-sitemap"></i>
            <span>家谱</span>
        </a>
        <a href="family_activity.html" class="tab-item">
            <i class="tab-icon fas fa-calendar-alt"></i>
            <span>活动</span>
        </a>
        <a href="family_stories.html" class="tab-item">
            <i class="tab-icon fas fa-book"></i>
            <span>故事</span>
        </a>
        <a href="profile.html" class="tab-item">
            <i class="tab-icon fas fa-user"></i>
            <span>我的</span>
        </a>
    </div>
</body>
</html> 